/**
 * Created by lenovo on 2016/3/15.
 */
public class threecaozuo2 {
    public static void main(String[] args) {
        int a,b,c;
        for(a=1;a<=9;a++)
            for(b=0;b<=9;b++)
                for(c=0;c<=9;c++)
                {
                    if(a*a*a+b*b*b+c*c*c==(100*a+10*b+c))
                        System.out.println(100*a+10*b+c);
                }
    }
}
